<script setup lang='ts'>
import * as echarts from "echarts";
import { onMounted, ref } from "vue";
var option = ref({
  xAxis: {
    data: ["Sun", "Mon", "Tue", "Wed", "Thu"],
  },
  yAxis: {},
  series: [
    {
      itemStyle: {
        borderRadius: [60, 60, 0, 0],
      },
      type: "bar",
      data: [220, 182, 191, 234, 290],
    },
  ],
});
let warp = ref("");
let myChart;
onMounted(() => {
  myChart = echarts.init(warp.value);
  option && myChart.setOption(option.value);
});
window.addEventListener("resize", function () {
  myChart.resize();
});
</script>
<template>
  <div ref="warp" style="width: 100%; height: 100%;"></div>
</template>

<style></style>